package com.example.entity.matirx;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 保养计划表
 */
@ApiModel(description = "保养计划")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "keep_plan")

public class KeepPlan implements Serializable {
    /**
     * 保养计划id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "保养计划id",example = "1")
    @NotNull(message = "保养计划id不能为null")
    private Integer id;

    /**
     * 保养计划名
     */
    @TableField(value = "plan_name")
    @ApiModelProperty(value = "保养计划名")
    @Size(max = 50, message = "保养计划名最大长度要小于 50")
    private String planName;

    /**
     * 保养计划备注
     */
    @TableField(value = "more_detial")
    @ApiModelProperty(value = "保养计划备注")
    @Size(max = 255, message = "保养计划备注最大长度要小于 255")
    private String moreDetial;

    /**
     * 保养计划频率
     */
    @TableField(value = "frequency")
    @ApiModelProperty(value = "保养计划频率",example = "1")
    private Integer frequency;

    /**
     * 生产模次
     */
    @TableField(value = "product_times")
    @ApiModelProperty(value = "生产模次",example = "1")
    private Integer productTimes;

    /**
     * 计划状态
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "计划状态",example = "1")
    private Integer status;

    @TableField(value = "creator",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "")
    @Size(max = 255, message = "最大长度要小于 255")
    private String creator;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "")
    private LocalDateTime createTime;

    @TableField(value = "updater",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "")
    @Size(max = 255, message = "最大长度要小于 255")
    private String updater;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "")
    private LocalDateTime updateTime;

    private static final long serialVersionUID = 1L;
}